package io.work1;

import java.io.File;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;

public class test2 {
    public static void main(String[] args) throws Exception {

        String[] other={"吃饭","睡觉","打豆豆"};
        Student zs=new Student("张四",25,"男",other);
        FileOutputStream fos=new FileOutputStream("Student.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(zs);
        System.out.println("写出完毕");
        oos.close();

    }
}
